Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #103 Remove width of checkbox from label #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hcarmona
Copy link

The label was spilling over by the width of the checkbox and the spacing. This PR removes the spillage.

@hcarmona
Copy link
Author

@bicknellr PTAL

@bicknellr bicknellr self-assigned this Aug 26, 2016
@@ -187,6 +187,7 @@
white-space: normal;
line-height: normal;
color: var(--paper-checkbox-label-color, var(--primary-text-color));
width: calc(100% - var(--paper-checkbox-size) - var(--paper-checkbox-label-spacing));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--paper-checkbox-size -> --calculated-paper-checkbox-size
var(--paper-checkbox-label-spacing) -> var(--paper-checkbox-label-spacing, 8px)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, slight hiccup here: this change prevents you from using 0 for --paper-checkbox-label-spacing if you're trying to clear the styling so you can use an external label, which I suspect is a relatively common case. Particularly, you can't add lengths (which have units) and unitless values with calc(). Also, you can't multiply two or more values having units, as the result would have units which aren't lengths; so multiplying by 1px or something to get around this is out. :/

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc: @danbeam

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, after reading the CSS values spec, this appears to be a bug in the implementation of calc() that happens to exist in all of Chrome / Firefox / Safari. (I haven't tried out Edge yet.) Filed as https://bugs.chromium.org/p/chromium/issues/detail?id=641556

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants